import request from '@/utils/request'

// 查询结算单列表
export function listType(query) {
  return request({
    url: '/settlement/list',
    method: 'get',
    params: query
  })
}
// 分页查询结算单列表
export function listRoomByPage(query) {
  return request({
    url: '/settlement/page',
    method: 'get',
    params: query
  })
}
// 查询结算单类型详细
export function getType(settlementId) {
  return request({
    url: '/settlement/' + settlementId,
    method: 'get'
  })
}
// 退房结算
export function Settlement(data) {
  return request({
    url: '/settlement/settlementByRoomNo',
    method: 'post',
    params: data
  })
}
// 新增房间类型
// export function addType(data) {
//   return request({
//     url: '/hotelRoomType',
//     method: 'post',
//     data: data
//   })
// }

// 修改结算单
export function updateType(data) {
  return request({
    url: '/settlement',
    method: 'put',
    data: data
  })
}

// 删除结算单
export function delType(settlementId) {
  return request({
    url: '/settlement/delete/' + settlementId,
    method: 'delete'
  })
}
